package com.design.springboot.booksharing.component;

import com.design.springboot.booksharing.utils.snowflake.Snowflake;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 雪花 id 生成组件配置
 *
 * @author admin
 */
@Configuration
public class SnowflakeConfiguration {

    @Bean(name = "snowflake")
    public Snowflake method() {
        return new Snowflake(1000);
    }
}
